package com.sy.server.config;

import org.mybatis.spring.mapper.MapperScannerConfigurer;
import org.springframework.boot.autoconfigure.AutoConfigureAfter;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
@AutoConfigureAfter(MyBatisConfig.class)
public class MapperConfig {
    @Bean
    public MapperScannerConfigurer configure(){
        MapperScannerConfigurer configurer=new MapperScannerConfigurer();
        configurer.setBasePackage("com.sy.server.mapper");
        configurer.setBeanName("sqlSessionFactory");
        return configurer;
    }
}
